local shizhi = fk.CreateSkill{
    name = "ym2__shizhi",
    tags = {Skill.Compulsory}
}
Fk:loadTranslationTable{
    ["ym2__shizhi"] = "矢志",
    [":ym2__shizhi"] = "锁定技，你失去最后手牌后，摸四张牌，然后若你体力上限大于1，减1点体力上限，否则结束当前回合。",

    ["$ym2__shizhi1"] = "护汉成勋业，矢志报国恩。",
    ["$ym2__shizhi2"] = "怀精忠之志，坦赤诚之心。",
}
shizhi:addEffect(fk.AfterCardsMove, {
    anim_type = "drawcard",
    can_trigger = function(self, event, target, player, data)
        if not (player:hasSkill(shizhi.name) and player:isKongcheng()) then return end
        for _, move in ipairs(data) do
        if move.from == player then
            for _, info in ipairs(move.moveInfo) do
            if info.fromArea == Card.PlayerHand then
                return true
            end
            end
        end
        end
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        player:drawCards(4, shizhi.name)
        if player.maxHp > 1 then
            room:changeMaxHp(player,-1)
        else
            room:endTurn()
        end
    end,
})
return shizhi